package greendbgui

class Person {

	static mapping = 
	{
		columns 
		{
			firstNames column:'first_names'
			birthday18 column:'bday_18'
		}
		version false
	}

	static hasMany = [electoralRollEntry:ElectoralRollEntry, 
	                  contact:Contact,
					  votingInfo:VotingInfo,
					  match1:PersonMatch,
					  match2:PersonMatch]
					
	static mappedBy = [match1: "person1",
	                   match2: "person2"]

    static constraints = {
    }

    String surname
    String firstNames
    Date birthday18

  	String toString()
	{
    	return surname + ", " + firstNames
  	}
}
